package com.ccrfid.rmc6.service.device;

import com.ccrfid.rmc6.appconfig.exception.pojo.AppException;
import com.ccrfid.rmc6.entity.device.NetreaderEntity;
import com.ccrfid.rmc6.repository.search.SearchCriteria;
import com.ccrfid.rmc6.resource.device.pojo.FloorPos;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;

import java.util.List;

public interface NetreaderService {
    //
    Page<NetreaderEntity> getNetreaderInfoPage(SearchCriteria criteria, Pageable pageable);
    List<NetreaderEntity> getNetreaderList(SearchCriteria criteria, Sort sort);

    //
    NetreaderEntity getNetreader(Long readerId);

    //
    NetreaderEntity createNetreader(NetreaderEntity entity) throws AppException;

    //
    NetreaderEntity updateNetreader(Long readerId, NetreaderEntity entity) throws AppException;

    void updateOnlineStatus(Integer readerNumber, Integer onlineStatus);

    //
    NetreaderEntity updatePosition(Long readerId, FloorPos floorPos) throws AppException;

    Boolean deletePosition(Long readerId) throws AppException;

    //
    int deleteNetreadersInfo(List<Long> idList);
}
